package com.whj.servicepay.service.impl;

import com.whj.internalcommon.request.OrderRequest;
import com.whj.servicepay.remote.ServiceOrderClient;
import com.whj.servicepay.service.AliPayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Auther: wanghaijun
 * @Date: 2023/3/1 - 03 - 01 - 19:26 
 * @Description: com.whj.servicepay.service.impl
 */

@Service
public class AliPayServiceImpl implements AliPayService {
    @Autowired
    private ServiceOrderClient serviceOrderClient;


    /**
     * service-pay 调用 service-order 实现订单状态的修改
     *
     * @param orderId orderId
     */
    @Override
    public void pay(Long orderId) {
        OrderRequest orderRequest = new OrderRequest();
        orderRequest.setOrderId(orderId);
        serviceOrderClient.pay(orderRequest);

    }
}
